<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h2>模板字符串</h2>
</body>
<script>
    const obj = {
        name: '张三',
        age: 20,
        address: '北京'
    }

    // let str = "我的名子叫" + obj.name + "我的年龄:" + obj.age
    let str = `我的名子叫${obj.name}, 我的年龄${obj.age},我的地址${obj.address}`
    console.log(str)
</script>

</html>